<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div{
            width: 200px;
            height: 100px;
            background-color: red;
            /*元素内容居中*/
            text-align: center;
            /*块级元素当前行居中*/
            margin: 0 auto;
        }
        h1{
            margin-bottom: 0;/*去掉h1自带的下外边距*/
        }
        p{
            margin-top: 0;/*去掉p自带的上外边距*/
        }

    </style>
</head>
<body>
<div>测试文本</div>
<h1>内容标题1</h1>
<p>段落标签p</p>
xxxx
<ul>
    <li>刘备</li>
    <li>关羽</li>
    <li>张飞</li>
</ul>
</body>
</html>